﻿<phone:PhoneApplicationPage 
    x:Class="OpenXLiveSilverlight.UpdateStatusPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">
    <phone:PhoneApplicationPage.Resources>
        <DataTemplate x:Key="SNSItemTemplate">
            <StackPanel Tag="{Binding DataContext, RelativeSource={RelativeSource TemplatedParent}}" 
                        Height="72" 
                        Margin="0,0,0,0" Orientation="Horizontal" 
                        Background="Transparent" 
                        VerticalAlignment="Center"
                        Tap="StackPanel_Tap">
                <Image x:Name="snsImage" Source="{Binding Logo}"
                       Height="60" Width="60"/>
                <TextBlock x:Name="snsTitle" Text="{Binding Name}"
                                               VerticalAlignment="Center"
                                               FontSize="25"
                                               Margin="12,0,0,0"/>
            </StackPanel>
        </DataTemplate>
    </phone:PhoneApplicationPage.Resources>
    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.Background>
            <ImageBrush ImageSource="/OpenXLiveSilverlight;component/UpdateBackPortrait.jpg"/>
        </Grid.Background>
        <Border Background="Black" Opacity="0.6" Grid.RowSpan="2"/>
        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,0">
            <TextBlock x:Name="ApplicationTitle" Text="微博求助" Style="{StaticResource PhoneTextNormalStyle}" TextAlignment="Center"/>
            <!--<TextBlock x:Name="PageTitle" Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>-->
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="430" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Border x:Name="picBorder" BorderBrush="Orange" BorderThickness="5" Width="272">
                <Image x:Name="imageCap"/>                
            </Border>
            <TextBlock Text="内容" Foreground="#99FFFFFF" Grid.Row="1" Margin="12,0,0,0"/>
            <TextBox Grid.Row="2" x:Name="txtContent" Text="这道题答不出来了，快来帮忙啊"/>
            <TextBlock Text="分享" Foreground="#99FFFFFF" Grid.Row="3" Margin="12,0,0,0"/>
            <Grid Grid.Row="4" Height="60" Margin="12,12,12,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Image x:Name="SNSImage" Height="60" Width="60"/>
                <TextBlock x:Name="SNSName" Margin="12,0,0,0" Grid.Column="1" FontSize="25" VerticalAlignment="Center"/>
                <Image x:Name="btnChoose" Grid.Column="2" Width="50" Height="50" HorizontalAlignment="Right" 
                       Source="/Images/ButtonChange_50.png"
                       Tap="btnChoose_Tap"/>
            </Grid>
            <TextBlock x:Name="txtError" Grid.Row="5" Text="请输入内容" Margin="12,0,0,0" Foreground="Red" Visibility="Collapsed"/>
            <Button x:Name="btnUpdate" Grid.Row="6" Width="200" Height="72" Content="发送" VerticalAlignment="Bottom" Click="btnUpdate_Click" />
        </Grid>
        <Grid x:Name="ChoosePanel" Grid.RowSpan="2" Margin="12,20,12,0" Visibility="Collapsed">
            <TextBlock Text="选择一个发布渠道"/>
            <ListBox x:Name="listBoxSNS" Grid.Row="3" 
                     Margin="0,50,0,0"
                     ItemTemplate="{StaticResource SNSItemTemplate}">
            </ListBox>
        </Grid>
        <Grid x:Name="SharingPanel" Grid.RowSpan="2" Margin="0,0,0,0" Visibility="Collapsed">
            <StackPanel VerticalAlignment="Center">
                <TextBlock Text="发送中" HorizontalAlignment="Center" Foreground="White"/>
                <ProgressBar IsIndeterminate="True"/>
            </StackPanel>
        </Grid>
    </Grid>
 
    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>
